package c.c.a;

import android.view.View;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class i0 {
    public static Object a = null;
    public static Field b = null;
    public static Class c = null;
    public static Class d = null;
    public static Class<?> e = null;
    public static Method f = null;
    public static boolean g = false;
    public static boolean h = false;
    public static boolean i = false;

    /* JADX WARNING: Missing exception handler attribute for start block: B:27:0x0082 */
    /* JADX WARNING: Failed to process nested try/catch */
    /* JADX WARNING: Can't wrap try/catch for region: R(4:25|26|27|28) */
    /* JADX WARNING: Missing block: B:30:0x0094, code skipped:
            r3 = move-exception;
     */
    /* JADX WARNING: Missing block: B:31:0x0095, code skipped:
            c.c.a.m0.b(r3);
     */
    public static void a() {
        /*
        r0 = android.os.Build.VERSION.SDK_INT;
        r1 = g;
        if (r1 != 0) goto L_0x00b2;
    L_0x0006:
        r1 = "android.view.WindowManagerGlobal";
        r2 = 1;
        r1 = java.lang.Class.forName(r1);	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        r3 = "sDefaultWindowManager";
        r4 = "mViews";
        r4 = r1.getDeclaredField(r4);	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        b = r4;	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        r1 = r1.getDeclaredField(r3);	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        r3 = b;	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        r3.setAccessible(r2);	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        r3 = b;	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        r3 = r3.getType();	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        r4 = java.util.ArrayList.class;
        if (r3 != r4) goto L_0x002d;
    L_0x002a:
        h = r2;	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        goto L_0x0039;
    L_0x002d:
        r3 = b;	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        r3 = r3.getType();	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        r4 = android.view.View[].class;
        if (r3 != r4) goto L_0x0039;
    L_0x0037:
        i = r2;	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
    L_0x0039:
        r1.setAccessible(r2);	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        r3 = 0;
        r1 = r1.get(r3);	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        a = r1;	 Catch:{ NoSuchFieldException -> 0x004e, IllegalAccessException -> 0x0049, ClassNotFoundException -> 0x0044 }
        goto L_0x0052;
    L_0x0044:
        r1 = move-exception;
        c.c.a.m0.b(r1);
        goto L_0x0052;
    L_0x0049:
        r1 = move-exception;
        c.c.a.m0.b(r1);
        goto L_0x0052;
    L_0x004e:
        r1 = move-exception;
        c.c.a.m0.b(r1);
    L_0x0052:
        r1 = "com.android.internal.view.menu.ListMenuItemView";
        r1 = java.lang.Class.forName(r1);	 Catch:{ ClassNotFoundException -> 0x0071, NoSuchMethodException -> 0x006c }
        e = r1;	 Catch:{ ClassNotFoundException -> 0x0071, NoSuchMethodException -> 0x006c }
        r1 = "com.android.internal.view.menu.MenuView$ItemView";
        r1 = java.lang.Class.forName(r1);	 Catch:{ ClassNotFoundException -> 0x0071, NoSuchMethodException -> 0x006c }
        r3 = "getItemData";
        r4 = 0;
        r4 = new java.lang.Class[r4];	 Catch:{ ClassNotFoundException -> 0x0071, NoSuchMethodException -> 0x006c }
        r1 = r1.getDeclaredMethod(r3, r4);	 Catch:{ ClassNotFoundException -> 0x0071, NoSuchMethodException -> 0x006c }
        f = r1;	 Catch:{ ClassNotFoundException -> 0x0071, NoSuchMethodException -> 0x006c }
        goto L_0x0075;
    L_0x006c:
        r1 = move-exception;
        c.c.a.m0.b(r1);
        goto L_0x0075;
    L_0x0071:
        r1 = move-exception;
        c.c.a.m0.b(r1);
    L_0x0075:
        r1 = 23;
        if (r0 < r1) goto L_0x008b;
    L_0x0079:
        r3 = "com.android.internal.policy.PhoneWindow$DecorView";
        r3 = java.lang.Class.forName(r3);	 Catch:{ ClassNotFoundException -> 0x0082 }
        c = r3;	 Catch:{ ClassNotFoundException -> 0x0082 }
        goto L_0x0098;
    L_0x0082:
        r3 = "com.android.internal.policy.DecorView";
        r3 = java.lang.Class.forName(r3);	 Catch:{ ClassNotFoundException -> 0x0094 }
        c = r3;	 Catch:{ ClassNotFoundException -> 0x0094 }
        goto L_0x0098;
    L_0x008b:
        r3 = "com.android.internal.policy.impl.PhoneWindow$DecorView";
        r3 = java.lang.Class.forName(r3);	 Catch:{ ClassNotFoundException -> 0x0094 }
        c = r3;	 Catch:{ ClassNotFoundException -> 0x0094 }
        goto L_0x0098;
    L_0x0094:
        r3 = move-exception;
        c.c.a.m0.b(r3);
    L_0x0098:
        if (r0 < r1) goto L_0x00a3;
    L_0x009a:
        r0 = "android.widget.PopupWindow$PopupDecorView";
        r0 = java.lang.Class.forName(r0);	 Catch:{ ClassNotFoundException -> 0x00ac }
        d = r0;	 Catch:{ ClassNotFoundException -> 0x00ac }
        goto L_0x00b0;
    L_0x00a3:
        r0 = "android.widget.PopupWindow$PopupViewContainer";
        r0 = java.lang.Class.forName(r0);	 Catch:{ ClassNotFoundException -> 0x00ac }
        d = r0;	 Catch:{ ClassNotFoundException -> 0x00ac }
        goto L_0x00b0;
    L_0x00ac:
        r0 = move-exception;
        c.c.a.m0.b(r0);
    L_0x00b0:
        g = r2;
    L_0x00b2:
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.c.a.i0.a():void");
    }

    public static boolean b(View view) {
        if (!g) {
            a();
        }
        Class cls = view.getClass();
        return cls == c || cls == d;
    }
}
